const upperLetterOnly = (value) => {
  // 只允许输入字母
  const regex = /[^A-Z]/gi;
  const uppercasedValue = value.toUpperCase();
  const valueNew = uppercasedValue.replace(regex, "");
  return valueNew;
};

const upperLetterAndNumber = (value) => {
  // 只允许输入数字和字母
  const regex = /[^A-Z0-9]/gi;
  const uppercasedValue = value.toUpperCase();
  const valueNew = uppercasedValue.replace(regex, "");
  return valueNew;
};

const upperLetterNumberAndSpace = (value) => {
  return value.replace(/[^a-zA-Z0-9\s]/g, "").toUpperCase();
};

export { upperLetterOnly, upperLetterAndNumber, upperLetterNumberAndSpace };
